<?php

use yii\db\Migration;
use yii\db\Schema;

class m180130_030047_ADD_FIELD_PRODUCT extends Migration
{
    public function up()
    {
        $this->addColumn('{{product}}', 'go_city', Schema::TYPE_INTEGER. "(5) DEFAULT  '0' COMMENT '上船城市' ");
        $this->addColumn('{{product}}', 'return_city', Schema::TYPE_INTEGER. "(5) DEFAULT  '0'COMMENT '下船城市' ");
        
        $this->addColumn('{{template}}', 'go_city', Schema::TYPE_INTEGER. "(5) DEFAULT  '0' COMMENT '上船城市' ");
        $this->addColumn('{{template}}', 'return_city', Schema::TYPE_INTEGER. "(5) DEFAULT  '0'COMMENT '下船城市' ");


    }

    public function down()
    {
        echo "m180130_030047_ADD_FIELD_PRODUCT cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
